package com.b.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 收藏夹与视频的关联关系表
    */
@Document(indexName = "favoritevideo")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FavoriteVideo {
    /**
    * 主键
    */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
    * 收藏夹ID（关联favorite表id）
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer favoriteId;

    /**
    * 视频ID（关联视频表id）
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer videoId;
}